package com.example.lvsuo.controller;

import com.example.lvsuo.entity.CwInvoice;
import com.example.lvsuo.entity.vo.xzhvo.CwInvoiceVo;
import com.example.lvsuo.modal.Result;
import com.example.lvsuo.service.ICwInvoiceService;
import com.example.lvsuo.service.ILvsKFService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("Kj")
public class LvsKFController {


    @Autowired
    ILvsKFService iLvsKFService;

    @GetMapping()
    public Result   getlists( CwInvoiceVo cwInvoiceVo){
        PageHelper.startPage(cwInvoiceVo.getCurrentPage(),cwInvoiceVo.getPageSize());
        PageInfo pageInfo = new PageInfo(iLvsKFService.lists(cwInvoiceVo));
        return    Result.back(pageInfo);

    }
}
